package com.education.business.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.education.model.dto.MenuTree;
import com.education.model.entity.SystemMenu;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 余一
 * @since 2021-09-10
 */
public interface SystemMenuMapper extends BaseMapper<SystemMenu> {

    /**
     * 根据角色id获取用户菜单
     * @param roleIds
     * @return
     */
    List<SystemMenu> getMenuListByRoleIds(List<Integer> roleIds);

    /**
     * 获取系统树形菜单
     * @return
     */
    List<MenuTree> getTreeMenuList();


    /**
     * 根据id 获取MenuTree
     * @param id
     * @return
     */
    MenuTree selectMenuTreeById(Integer id);
}
